﻿using System;
using System.Configuration;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KPIS.DBM;
using KPIS.GERP.GBMS.MODEL;
using KPIS.GERP.GBMS.DAL;

namespace KPIS.GERP.GBMS.DAL
{
    public sealed class SystemControlDAL 
    {
        IDBManager dbManager = new DBManager(SystemInfo._DataProvider, SystemInfo._ConnectionString);

        public SystemControlDAL()
        {

        }
    }
}

/*

SELECT CONCAT('A-', T.BGM_SOURCE_TYPE_SEQ) AS ID, T.BGM_SOURCE_TYPE_NAME AS NAME, NULL AS PARENT
FROM BGM_MAS_SOURCE_TYPE T
WHERE T.RECORD_STATUS not like 'D'

UNION ALL

SELECT CONCAT('B-', S.BGM_SOURCE_SEQ) AS ID, S.BGM_SOURCE_NAME AS NAME, COALESCE(CONCAT('B-', UPPER_BGM_SOURCE_SEQ), CONCAT('A-', S.BGM_SOURCE_TYPE_SEQ)) AS PARENT
FROM BGM_MAS_SOURCE S
WHERE S.RECORD_STATUS not like 'D'

UNION ALL

SELECT CONCAT('C-', EG.BGM_EXP_GRP_SEQ) AS ID, EG.BGM_EXP_GRP_NAME AS NAME, COALESCE(CONCAT('C-', EG.UPPER_BGM_EXP_GRP_SEQ), CONCAT('B-', EG.BGM_SOURCE_SEQ)) AS PARENT
FROM BGM_MAS_EXPENSE_GROUP EG
WHERE RECORD_STATUS not like 'D'

UNION ALL

SELECT CONCAT('D-', E.BGM_EXP_SEQ) AS ID, E.BGM_EXP_NAME AS NAME, COALESCE(CONCAT('D-', E.UPPER_BGM_EXP_SEQ), CONCAT('C-', E.BGM_EXP_GRP_SEQ)) AS PARENT
FROM BGM_MAS_EXPENSE E
WHERE E.RECORD_STATUS not like 'D'


*/